//
//  ManagementStudentView.m
//  CoachsBook
//
//  Created by MaBookPro on 2022/8/19.
//

#import "ManagementStudentView.h"

@implementation ManagementStudentView


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self CreateUI];
    }
    return self;
}
-(void)CreateUI{

    
    UIView *backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, APPwidth, 120)];
    backView.backgroundColor = [UIColor whiteColor];
    backView.userInteractionEnabled = YES;
    [self addSubview:backView];
    
    _searchBtn  = [[UIButton alloc]initWithFrame:CGRectMake(15, 0, APPwidth-30, 40)];
    [_searchBtn setImage:[UIImage imageNamed:@"search"] forState:0];
    [_searchBtn setTitle:@"学员姓名或手机号查询" forState:0];
    _searchBtn.titleLabel.textAlignment = 1;
    [_searchBtn setBackgroundColor:rgba(246, 247, 252, 1)];
    _searchBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [_searchBtn setTitleColor:rgba(153, 153, 153, 1) forState:0];
    _searchBtn.layer.cornerRadius = 15;
    [backView addSubview:_searchBtn];

    
    //考试安排按钮
    UIButton *anpaiBtn = [[UIButton alloc]initWithFrame:CGRectMake(15, _searchBtn.frame.size.height+_searchBtn.frame.origin.y+10, APPwidth/2 -22.5, 70)];
    anpaiBtn.layer.cornerRadius = 8;
    [anpaiBtn setBackgroundColor:rgba(219, 244, 250, 1)];
    [backView addSubview:anpaiBtn];

    UILabel *anpaiLab = [[UILabel alloc]initWithFrame:CGRectMake(15,  15, 60, 15)];
    anpaiLab.text = @"考试安排";
    anpaiLab.textColor = rgba(51, 51, 51, 1);
    anpaiLab.textAlignment = 0;
    anpaiLab.font = [UIFont boldSystemFontOfSize:14];
    [anpaiBtn addSubview:anpaiLab];
    
    UILabel *typeLab = [[UILabel alloc]initWithFrame:CGRectMake(15, anpaiLab.height+anpaiLab.y+ 10, 80, 15)];
    typeLab.text = @"安排各科考试";
    typeLab.textColor = rgba(153, 153, 153, 1);
    typeLab.textAlignment = 0;
    typeLab.font = [UIFont boldSystemFontOfSize:12];
    [anpaiBtn addSubview:typeLab];
    
    
    UIImageView *anpaiImg = [[UIImageView alloc]initWithFrame:CGRectMake(anpaiBtn.width -55, 15, 40, 40)];
    anpaiImg.image = [UIImage imageNamed:@"ksanpai"];
    anpaiImg.userInteractionEnabled = YES;
    [anpaiBtn addSubview:anpaiImg];
    
    
    //群发短信
    _duanxinBtn = [[UIButton alloc]initWithFrame:CGRectMake(APPwidth/2+ 15/2, _searchBtn.frame.size.height+_searchBtn.frame.origin.y+10, APPwidth/2 -22.5, 70)];
    _duanxinBtn.layer.cornerRadius = 8;
    [_duanxinBtn setBackgroundColor:rgba(219, 244, 250, 1)];
    [backView addSubview:_duanxinBtn];

    UILabel *duanxinLab = [[UILabel alloc]initWithFrame:CGRectMake(15,  15, 60, 15)];
    duanxinLab.text = @"群发短信";
    duanxinLab.textColor = rgba(51, 51, 51, 1);
    duanxinLab.textAlignment = 0;
    duanxinLab.font = [UIFont boldSystemFontOfSize:14];
    [_duanxinBtn addSubview:duanxinLab];
    
    UILabel *yijianLab = [[UILabel alloc]initWithFrame:CGRectMake(15,duanxinLab.height+duanxinLab.y+  10, 80, 15)];
    yijianLab.text = @"一键群发短信";
    yijianLab.textColor = rgba(153, 153, 153, 1);
    yijianLab.textAlignment = 0;
    yijianLab.font = [UIFont boldSystemFontOfSize:12];
    [_duanxinBtn addSubview:yijianLab];
    
    
    UIImageView *duanxinImg = [[UIImageView alloc]initWithFrame:CGRectMake(anpaiBtn.width -55, 15, 40, 40)];
    duanxinImg.image = [UIImage imageNamed:@"duanxin"];
    duanxinImg.userInteractionEnabled = YES;
    [_duanxinBtn addSubview:duanxinImg];
    
    
    
    
    
}



@end
